package com.ruoyi.project.tool.swagger;

import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.OperatorType;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mobile")
public class CategoryController {

    @Autowired
    private ISysDeptService deptService;
    /**
     * 加载店铺分类
     */
    @GetMapping(value = "/category")
    @Log(title = "店铺分类", operatorType = OperatorType.MOBILE)
    @ResponseBody
    public AjaxResult category()
    {
        return AjaxResult.success(deptService.selectCategory());
    }
}
